import { Ref } from 'vue';

export type NumOrStr = number | string;

export type NumsOrStrs = NumOrStr[];

export interface TabItem {
  id: NumOrStr;
  name: string;
  oppositeIds: NumsOrStrs;
  category: string;
  lock?: boolean;
  multiple: boolean;
}

export type TabListType = TabItem[];

export interface Option {
  currentItem: TabItem;
  oldMutexList: TabListType;
  selectedList: TabListType;
}

export interface UseMutexResult {
  mutexList: Ref<TabListType>;
  selectedList: Ref<TabListType>;
  handleSelect: (item: TabItem) => SelectedResult;
  judgeActived: (item: TabItem) => boolean;
}

export type SelectedResult = boolean[];
